

if ( SERVER ) then

	AddCSLuaFile( "shared.lua" )
	
end

if ( CLIENT ) then

	SWEP.PrintName			= "Water Charger"			
	SWEP.Author				= "Fadi"
	SWEP.Slot				= 3
	SWEP.SlotPos			= 1

	SWEP.DrawAmmo			= true
	SWEP.DrawCrosshair		= false
	SWEP.ViewModelFOV		= 82
	SWEP.ViewModelFlip		= true
	SWEP.CSMuzzleFlashes	= true
	
	// This is the font that's used to draw the death icons
	surface.CreateFont( "csd", ScreenScale( 30 ), 500, true, true, "CSKillIcons" )
	surface.CreateFont( "csd", ScreenScale( 60 ), 500, true, true, "CSSelectIcons" )

	
	SWEP.IconLetter 		= "n"

	killicon.AddFont("weapon_real_cs_scout", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ))
end


SWEP.HoldType			= "rpg"
SWEP.Base				= "weapon_fadi_base_snip"
SWEP.Category			= "Fadi's Admin Weapons"

SWEP.Spawnable			= false
SWEP.AdminSpawnable		= true

SWEP.ViewModel			= "models/weapons/v_snip_scout.mdl"
SWEP.WorldModel			= "models/weapons/w_snip_scout.mdl"

SWEP.Weight				= 5
SWEP.AutoSwitchTo		= false
SWEP.AutoSwitchFrom		= false

SWEP.Primary.Sound			= Sound( "npc/env_headcrabcanister/explosion.wav" )
SWEP.Primary.Recoil			= 1.5
SWEP.Primary.Damage			= 999
SWEP.Primary.NumShots		= 1
SWEP.Primary.Cone			= 0.0
SWEP.Primary.ClipSize		= -1
SWEP.Primary.Delay			= 1.0
SWEP.Primary.DefaultClip	= -1
SWEP.Primary.Automatic		= false
SWEP.Primary.Ammo			= "none"

SWEP.Secondary.Automatic	= false
SWEP.Secondary.Ammo			= "none"

SWEP.IronSightsPos 		= Vector( 6.1, -7, 2.5 )
SWEP.IronSightsAng 		= Vector( 2.8, 0, 0 )


function SWEP:PrimaryAttack ( )
	self.Weapon:EmitSound( "ambient/water/water_splash1.wav" )
         self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
	 self.Owner:SetAnimation ( PLAYER_ATTACK1 )
	 self.Weapon:SetNextPrimaryFire ( CurTime ( ) + 1.3 )
	 local thetrace = self.Owner:GetEyeTrace ( )

         local effectdata = EffectData ( )
         effectdata:SetOrigin ( thetrace.HitPos )
         effectdata:SetScale ( 10 )
         util.Effect( "WaterSurfaceExplosion", effectdata )
		 

	 local damage = ents.Create ( "point_hurt" )
	 damage:SetKeyValue ( "DamageRadius", 150 )
	 damage:SetKeyValue ( "Damage" , 100000 )
	 damage:SetKeyValue ( "DamageDelay", 0 )

	 damage:SetPos ( thetrace.HitPos )
	 damage:Fire ( "TurnOn" , "", 0 )
	 damage:Fire ( "TurnOff" , "", 2 )
	 damage:Fire ( "kill","", 1 )


end


SWEP.IronSightsPos 			= Vector (4.9906, -9.5434, 2.5078)
SWEP.IronSightsAng 			= Vector (0, 0, 0)
SWEP.IronSightZoom			= 1.3 -- How much the player's FOV should zoom in ironsight mode. 
SWEP.UseScope				= true -- Use a scope instead of iron sights.
SWEP.ScopeScale 				= 0.4 -- The scale of the scope's reticle in relation to the player's screen size.
SWEP.ScopeZooms				= {8} -- The possible magnification levels of the weapon's scope.   If the scope is already activated, secondary fire will cycle through each zoom level in the table.
SWEP.DrawParabolicSights		= false -- Set to true to draw a cool parabolic sight (helps with aiming over long distances)